package com.lw.ipad;

import java.net.InetSocketAddress;

/**
 * @author LW
 * @2020/9/12 10:03
 */

//
public class TestInetSocketAddress {

    public static void main(String[] args) {
        InetSocketAddress inetSocketAddress = new InetSocketAddress("127.0.0.1",8080);
        System.out.println(inetSocketAddress);
        System.out.println(inetSocketAddress.getAddress());
        System.out.println(inetSocketAddress.getHostName());//地址   127.0.0.1
        System.out.println(inetSocketAddress.getPort());//端口  8080


    }
}
